<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <input type="text" id="screen" value="0">
    <div id="screen">
        0
    </div>
    <button id="plus">+</button>

    <script>
        let plusBtn = document.querySelector('#plus');
        plusBtn.onclick = function() {
            //1.获取到screen里面的值
            let screen = document.querySelector('#screen');
            let val = screen.value;
            val = parseInt(val);
            //2.把这个值+1
            val += 1;
            //3.最后再把这个新值写回去
            screen.value = val;
        }
    </script>
</body>
</html>